home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1997 August
/
Walnut Creek CDROM.7z
/
LISTINGS
/
V_13_03
/
SAKS.ZIP
/
DECOUPLE.CPP
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1995-01-05
|
380 b
|
31 lines
Listing 5 - Decoupling the class hierarchy structure from
application code using a member typedef.
//
// class library code
//
class B
{
public:
void f();
...
};
class D : public B
{
public:
typedef B inherited;
void f();
};
//
// library user's code
//
void g(D *pd)
{
pd->inherited::f();
...
}